﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                      xmlns:controls="clr-namespace:Rabbit.Controls;assembly=Rabbit.Controls"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
                    xmlns:d="http://schemas.microsoft.com/expression/interactivedesigner/2006" 
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                    mc:Ignorable="d">

    <Style x:Key="LoginWindowBorder"  TargetType="Border" >
        <Setter Property="BorderBrush" Value="#333333"/>
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="#4a4a4a"/>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="CornerRadius" Value="5"/>
        <Setter Property="Margin" Value="10"/>
        <Setter Property="Effect">
            <Setter.Value>
                <DropShadowEffect Opacity="0.45" BlurRadius="9"/>
            </Setter.Value>
        </Setter>
    </Style>
    <Style  x:Key="MainWindowBorder" TargetType="Border">
        <Setter Property="BorderBrush" Value="#333333"/>
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="#132639"/>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="CornerRadius" Value="5"/>
    </Style>

    <sys:String x:Key="CloseButton">pack://application:,,,/Rabbit.Themes;component/Win7/Images/TitleBarCloseButton_Normal.png</sys:String>
    <sys:String x:Key="MaxButton">pack://application:,,/Rabbit.Themes;component/Win7/Images/Maximized.png</sys:String>
    <sys:String x:Key="MinButton">pack://application:,,,/Rabbit.Themes;component/Win7/Images/TitleBarMinimizeButton_Normal.png</sys:String>
    <sys:String x:Key="SearchButton">pack://application:,,,/Rabbit.Themes;component/Win7/Images/SearchButton.png</sys:String>
    <sys:String x:Key="SettingsButton">pack://application:,,,/Rabbit.Themes;component/Win7/Images/TitleBarSettings.png</sys:String>
    <sys:String x:Key="HorizontalSplitter">pack://application:,,,/Rabbit.Themes;component/Win7/Images/HorizontalSplitter.png</sys:String>

    <ImageBrush x:Key="WindowBackgroundBrush" Opacity="0" ImageSource="/Rabbit.Themes;component/Win7/Images/main_background.png" Stretch="Fill"/>
    <ImageBrush x:Key="TitleBarLeftCornerHighlight" Opacity="0.5" AlignmentX="Left"  ImageSource="/Rabbit.Themes;component/Win7/Images/TitleBarLeftCornerHighlight.png" Stretch="None"/>
    <ImageBrush x:Key="LoginButtonBackground" ImageSource="/Rabbit.Themes;component/Win7/Images/LoginButtonBackground.png" Stretch="None"/>
    <ImageBrush x:Key="LoginButtonBackgroundHover" ImageSource="/Rabbit.Themes;component/Win7/Images/LoginButtonHoverBackground.png" Stretch="None"/> 
    <ImageBrush x:Key="MainMenuSplitterBrush" ImageSource="/Rabbit.Themes;component/Win7/Images/MainMenuSpliter.png" AlignmentY="Bottom"/>
    <ImageBrush x:Key="PublishStatusButtonBackgroundBrush" ImageSource="/Rabbit.Themes;component/Win7/Images/PublishStatusButtonBackground.png"/>
    <ImageBrush x:Key="MainMenuHoverBackgroundBrush" ImageSource="/Rabbit.Themes;component/Win7/Images/MainMenuHoverBackground.png" Stretch="UniformToFill" AlignmentX="Center" AlignmentY="Center"/>
    <ImageBrush x:Key="LoginUserTipBackground" ImageSource="/Rabbit.Themes;component/Win7/Images/LoginUserTipBackground.png" Stretch="UniformToFill" AlignmentX="Center" AlignmentY="Center"/>
    <ImageBrush x:Key="DeleteUserButton" ImageSource="/Rabbit.Themes;component/Win7/Images/TitleBarCloseButton_Normal.png" />
    
   
    <!--Main Menu Icon, height:27 widht:24-->
    <ImageBrush x:Key="MainMenuHome" ImageSource="/Rabbit.Themes;component/Win7/Images/MainMenuHome.png" Stretch="Uniform" />
    <ImageBrush x:Key="MainMenuMetionedMe" ImageSource="/Rabbit.Themes;component/Win7/Images/MainMenuMetionedMe.png"  Stretch="Uniform"/>
    <ImageBrush x:Key="MainMenuComments" ImageSource="/Rabbit.Themes;component/Win7/Images/MainMenuComment.png"  Stretch="Uniform" />
    <!--Height="27" Width="24"-->
    <ImageBrush x:Key="MainMenuLetter" ImageSource="/Rabbit.Themes;component/Win7/Images/MainMenuLetter.png" Stretch="Uniform"/>
    <!--Height="27" Width="24"-->
    <ImageBrush x:Key="MainMenuFavorite" ImageSource="/Rabbit.Themes;component/Win7/Images/MainMenuFavorite.png" Stretch="Uniform" />
    <ImageBrush x:Key="MainMenuSearch" ImageSource="/Rabbit.Themes;component/Win7/Images/MainMenuSearch.png" Stretch="Uniform"/>

    <Image x:Key="TitleBarCloseButton_Normal" Source="/Rabbit.Themes;component/Win7/Images/TitleBarCloseButton_Normal.png" Stretch="Fill" />
    <Image x:Key="OKMessageIcon" Source="/Rabbit.Themes;component/Win7/Images/OKMessageIcon.png"  Height="32" Width="32" />
    <Image x:Key="FailMessageIcon" Source="/Rabbit.Themes;component/Win7/Images/FailMessageIcon.png" Height="18" Width="18" />
    <Image x:Key="CertificateUser" Source="/Rabbit.Themes;component/Win7/Images/CertificatedUser.png" Height="18" Width="20" />
    <controls:ImageEx x:Key="ProcessingMessageIcon" Source="/Rabbit.Themes;component/Win7/Images/Processing.gif" Height="14" Width="14" />

    <SolidColorBrush x:Key="WindowTitleBackground" Color="#6e6e6e"/>
    <SolidColorBrush x:Key="GrayColorBrush" Color="#d3d3d3"/>
    <SolidColorBrush x:Key="MyScreenNameColor" Color="White"/>
    <SolidColorBrush x:Key="WindowTitleBarInnerBorder" Color="#a3a3a3"/>
    <SolidColorBrush x:Key="UserListComboBoxBorderBrush" Color="#7ee9fc"/>
    <SolidColorBrush x:Key="FowardedStatusForegroundBrush" Color="#898989"/>
    <SolidColorBrush x:Key="FowardedStatusLeftLineBrush" Color="#bdbdbd"/>
    <SolidColorBrush x:Key="StatusForegroundBrush" Color="#333333"/>
    <SolidColorBrush x:Key="ReplyOrForwardBackgroundColor" Color="#fbfae9"/>

    <Style TargetType="Border" x:Key="MyInformationStyle">
        <Setter Property="Margin" Value="15,0,5,0"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="5,0,5,0"/>
        <Setter Property="CornerRadius" Value="5"/>
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Background">
                    <Setter.Value>
                        <SolidColorBrush Color="#6bb4e8" Opacity="0.1"/>
                    </Setter.Value>
                </Setter>
                <Setter Property="BorderBrush">
                    <Setter.Value>
                        <SolidColorBrush Color="#9cccf1" Opacity="0.4"/>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
    <LinearGradientBrush x:Key="ButtonBackgroundLinearBrush" EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
        <GradientStop Color="#FFE1E1E3" Offset="1"/>
        <GradientStop Color="White"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ButtonBackgroundLinearRevertBrush" EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
        <GradientStop Color="#FFE1E1E3"/>
        <GradientStop Color="White"  Offset="1"/>
    </LinearGradientBrush>
    
   
    <Style TargetType="{x:Type Button}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="BorderBrush" Value="#d4d8db"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Height" Value="20"/>
        <Setter Property="Width" Value="40"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Background" Value="{DynamicResource ButtonBackgroundLinearBrush}"/>
        <Setter Property="Template" Value="{DynamicResource ButtonTemplate}"/>
    </Style>

    <Style x:Key="GetMoreButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
        <Setter Property="Foreground" Value="Black"/>
        <Setter Property="BorderBrush" Value="#d4d8db"/>
        <Setter Property="BorderThickness" Value="0,1,0,1"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Height" Value="20"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Background" Value="{DynamicResource ButtonBackgroundLinearBrush}"/>
        <Setter Property="Template" Value="{DynamicResource ButtonTemplate}"/>
        <Setter Property="Content">
            <Setter.Value>
                <StackPanel Orientation="Horizontal">
                    <Image Source="/Rabbit.Themes;component/Win7/Images/GetMoreButtonIcon.png" Height="10" Width="7"/>
                    <TextBlock Margin="5,0,0,0">获取更多</TextBlock>
                </StackPanel>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <!--<Setter Property="Template" Value="{DynamicResource StretchContentButtonTemplate}"/>-->
                <Setter Property="Content">
                    <Setter.Value>
                        <StackPanel Orientation="Horizontal">
                            <controls:ImageEx Source="/Rabbit.Themes;component/Win7/Images/Processing.gif" Stretch="None"/>
                            <TextBlock Margin="5,0,0,0">正在获取...</TextBlock>
                        </StackPanel>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="LoginButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
        <Setter Property="Foreground" Value="Black"/>
        <Setter Property="BorderBrush" Value="#d4d8db"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Height" Value="25"/>
        <Setter Property="Width" Value="60"/>
        <Setter Property="Background" Value="{DynamicResource ButtonBackgroundLinearBrush}"/>
        <Setter Property="Template" Value="{DynamicResource ButtonTemplate}"/>
        <Setter Property="Content">
            <Setter.Value>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Margin="5,0,0,0">登录</TextBlock>
                </StackPanel>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Content">
                    <Setter.Value>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Margin="5,0,0,0">登录中</TextBlock>
                        </StackPanel>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="ButtonTemplate" TargetType="{x:Type Button}">
        <Border x:Name="ContentContainer" Height="{TemplateBinding Height}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"  Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource ButtonBackgroundLinearRevertBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Padding" Value="0,2,0,0"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <ControlTemplate x:Key="StretchContentButtonTemplate" TargetType="{x:Type Button}">
        <Border x:Name="ContentContainer" Height="{TemplateBinding Height}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"  Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
            <ContentPresenter />
        </Border>
    </ControlTemplate>

    <Style x:Key="WindowTitleBarButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
        <Setter Property="Padding" Value="0,2,0,0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border x:Name="ContentContainer" Height="20" Width="20" BorderThickness="0"  Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="{x:Null}"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background">
                    <Setter.Value>
                        <ImageBrush Stretch="None" ImageSource="/Rabbit.Themes;component/Win7/Images/TitleBarButtonHoverBackground.png"/>
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Padding" Value="0,3,0,0"/>
                <Setter Property="Background">
                    <Setter.Value>
                        <ImageBrush Stretch="None" ImageSource="/Rabbit.Themes;component/Win7/Images/TitleBarButtonPressedBackground.png"/>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
    
   

    <Style TargetType="{x:Type TabItem}" x:Key="MainTabItemStyle">
        <Setter Property="Padding" Value="0"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Bottom"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid Margin="0">
                        <Border Name="Border" BorderBrush="{DynamicResource MainMenuSplitterBrush}"  Padding="0" BorderThickness="{TemplateBinding BorderThickness}" Height="35" Width="40">
                            <ContentPresenter x:Name="Content" Margin="{TemplateBinding Padding}" ContentSource="Header" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="Border" Property="Border.Background" Value="{DynamicResource MainMenuHoverBackgroundBrush}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Border" Property="Border.Background" Value="{DynamicResource MainMenuHoverBackgroundBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
 
    <!-- Simple MenuItem - The template uses triggers to provide four different arrangements of menu item which are set via the Role property -->
    <Style x:Key="SimpleMenuItemStyle" TargetType="{x:Type MenuItem}">
        <Setter Property="Height" Value="22"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type MenuItem}">
                    <Border x:Name="Border" CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid>
                            <!-- The Grid is used to hold together columns for an Icon, Content, Glyph checkmark and Arrow to show the next level
							 Size sharing is used in Grid so that the Icon, Content, Arrow for each MenuItem align together -->
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup"/>
                            </Grid.ColumnDefinitions>

                            <!-- Content for the menu text etc -->
                            <ContentPresenter Grid.Column="0" Margin="{TemplateBinding Padding}" x:Name="HeaderHost" RecognizesAccessKey="True" ContentSource="Header"/>

                            <!-- The Popup is the body of the menu which expands down or across depending on the level of the item -->
                            <Popup IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Top" x:Name="SubMenuPopup" Focusable="false" AllowsTransparency="true" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" VerticalOffset="-3">
                                <Grid x:Name="SubMenu">
                                    <Border x:Name="SubMenuBorder" Padding="4,4,4,0"  Background="#132639" BorderBrush="{DynamicResource SolidBorderBrush}" CornerRadius="5" BorderThickness="1"/>
                                    <!-- StackPanel holds children of the menu. This is set bu IsItemsHost=True -->
                                    <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle"/>
                                </Grid>
                            </Popup>

                        </Grid>
                    </Border>

                    <!-- These triggers re-configure the four arrangements of MenuItem to show different levels of menu via Role -->
                    <ControlTemplate.Triggers>

                        <!-- Role = TopLevelHeader : this is the root menu item in a menu; the Popup expands down -->
                        <Trigger Property="Role" Value="TopLevelHeader">
                            <Setter Property="Margin" Value="0,1,0,1"/>
                            <Setter Property="Padding" Value="6,3,6,3"/>
                            <Setter Property="Grid.IsSharedSizeScope" Value="true"/>
                            <Setter Property="Placement" Value="Bottom" TargetName="SubMenuPopup"/>
                        </Trigger>

                        <!-- Role = TopLevelItem :  this is a child menu item from the top level without any child items-->
                        <Trigger Property="Role" Value="TopLevelItem">
                            <Setter Property="Margin" Value="0,1,0,1"/>
                            <Setter Property="Padding" Value="6,3,6,3"/>
                        </Trigger>

                        <!-- Role = SubMenuHeader : this is a child menu item which does not have children -->
                        <Trigger Property="Role" Value="SubmenuHeader">
                            <Setter Property="DockPanel.Dock" Value="Top"/>
                            <Setter Property="Padding" Value="0,2,0,2"/>
                            <Setter Property="Grid.IsSharedSizeScope" Value="true"/>
                        </Trigger>

                        <!-- Role = SubMenuItem : this is a child menu item which has children-->
                        <Trigger Property="Role" Value="SubmenuItem">
                            <Setter Property="DockPanel.Dock" Value="Top"/>
                            <Setter Property="Padding" Value="4,0,4,0"/>
                        </Trigger>
                        <Trigger Property="IsSuspendingPopupAnimation" Value="true">
                            <Setter Property="PopupAnimation" Value="None" TargetName="SubMenuPopup"/>
                        </Trigger>

                        <Trigger Property="AllowsTransparency" SourceName="SubMenuPopup" Value="true">
                            <Setter Property="Margin" Value="0,0,3,3" TargetName="SubMenu"/>
                            <Setter Property="SnapsToDevicePixels" Value="true" TargetName="SubMenu"/>
                            <!--<Setter Property="BitmapEffect" Value="{DynamicResource PopupDropShadow}" TargetName="SubMenuBorder"/>-->
                        </Trigger>

                        <!-- Using the system colors for the Menu Highlight and IsEnabled-->
                        <Trigger Property="IsHighlighted" Value="true">
                            <Setter Property="BorderBrush" Value="#455261" TargetName="Border"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="BorderThickness" TargetName="Border" Value="1"/>
                            <Setter Property="BorderBrush" TargetName="Border" Value="#455261"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="BorderThickness" TargetName="Border" Value="1"/>
                            <Setter Property="BorderBrush" TargetName="Border" Value="#455261"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style TargetType="Menu">
        <Setter Property="Background" Value="{x:Null}"/>
    </Style> 
    <Style x:Key="AppTitleStyle" TargetType="TextBlock">
        <Setter Property="Foreground" Value="{DynamicResource GrayColorBrush}"/>
        <Setter Property="FontSize" Value="13"/>
    </Style>
    <Style TargetType="TextBlock">
        <Setter Property="FontSize" Value="12"/>
    </Style>

    <Style x:Key="DeleteUserButtonStyle" TargetType="Button">
        <Setter Property="Background" Value="{DynamicResource DeleteUserButton}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Template" Value="{DynamicResource StretchContentButtonTemplate}" />
    </Style>
     
    <Style TargetType="TabControl">
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="0"/>
    </Style>
    <Style x:Key="PopupMessageStyle" TargetType="Run">
        <Setter Property="Foreground" Value="Black"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="Gray"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="PictureViewerTitleBar" TargetType="{x:Type Canvas}">
        <Setter Property="Height" Value="20"/>
        <Setter Property="Panel.ZIndex" Value="1"/>
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="Black" Opacity="0.5"/>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="PictureViewerFunctionTextStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="FontSize" Value="11"/>
    </Style>
    <Style x:Key="PublishButtonStyle" TargetType="Button">
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
        <Setter Property="Background" Value="{DynamicResource PublishStatusButtonBackgroundBrush}"/>
        <Setter Property="Width" Value="65"/>
        <Setter Property="Height" Value="24"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border x:Name="ContentContainer" CornerRadius="3" Height="{TemplateBinding Height}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"  Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="{DynamicResource ButtonBackgroundLinearRevertBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Padding" Value="0,2,0,0"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="MainContentBackground" TargetType="Border">
        <Setter Property="Background" Value="#dde0e4"/>
    </Style>

    <Style x:Key="emotionTabItemStyle" TargetType="TabItem">
        <Setter Property="Foreground" Value="Black"/>
        <Setter Property="Padding" Value="6,1,6,1"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid SnapsToDevicePixels="true">
                        <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="3" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
                            <ContentPresenter x:Name="Content"  ContentSource="Header" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" TargetName="Bd" Value="#c6c9cc"/>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="Background" TargetName="Bd" Value="#c6c9cc"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SubHeaderMenuItemStyle" TargetType="{x:Type TabItem}">
        <Setter Property="Foreground" Value="#333333"/>
        <Setter Property="Padding" Value="6,1,6,1"/>
        <Setter Property="Height" Value="23"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid SnapsToDevicePixels="true">
                        <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="3" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
                            <ContentPresenter x:Name="Content"  ContentSource="Header" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" TargetName="Bd" Value="#c6c9cc"/>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="Background" TargetName="Bd" Value="#c6c9cc"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
        <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="Padding" Value="0,0,0,0"/>

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate  TargetType="{x:Type ListBoxItem}">
                    <Border x:Name="Bd" Margin="0"  CornerRadius="3" BorderThickness="0,0,0,1" BorderBrush="#d4d8db" Background="{TemplateBinding Background}" Padding="2" SnapsToDevicePixels="true">
                        <!--<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>-->
                        <ContentPresenter/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" TargetName="Bd" Value="#f6f6f6"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Hyperlink}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
        <Setter Property="Foreground" Value="#1670eb"/>
        <Setter Property="TextDecorations" Value="None"/>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Foreground" Value="Gray"/>
            </Trigger>
            <MultiTrigger>
            <MultiTrigger.Conditions>
                <Condition Property="IsEnabled" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
            </MultiTrigger.Conditions> 
                <Setter Property="TextDecorations" Value="Underline"/>
            </MultiTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="emotionStyle" TargetType="Border">
        <Setter Property="BorderBrush" Value="#ebeff0"/>
        <Setter Property="Height" Value="20"/>
        <Setter Property="Width" Value="20"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="BorderBrush" Value="#90acbd"/>
                <Setter Property="BorderThickness" Value="1"/>
                <Setter Property="Background" Value="#e4f1f9"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="EmotionListBorderStyle" TargetType="Border">
        <Setter Property="BorderBrush" Value="#d4d8db"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Background" Value="#fbfae9"/>
        <Setter Property="Height" Value="100"/>
        <Setter Property="Width" Value="307"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>
    <Style x:Key="PopupMessageTextBlockStyle" TargetType="TextBlock">
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="Margin" Value="5,0,0,0"/>
        <Setter Property="TextWrapping" Value="Wrap"/> 
    </Style>
    <Style x:Key="PopupMessageBorderStyle" TargetType="{x:Type Border}">
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="#5f5f5f" Opacity="0.85"/>
            </Setter.Value>
        </Setter>
        <!--<Setter Property="Padding" Value="10"/>-->
        <Setter Property="Width" Value="165"/>
        <Setter Property="MinHeight" Value="65"/>
        <Setter Property="CornerRadius" Value="5"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="Effect">
            <Setter.Value>
                <DropShadowEffect Opacity="0.3"/>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="mainTabControlStyle" TargetType="{x:Type TabControl}">
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Margin" Value="0,0,0,-2"/>
        <Setter Property="Padding" Value="0,0,0,72"/>
        <Setter Property="TabStripPlacement" Value="Bottom"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition x:Name="ColumnDefinition0"/>
                            <ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition x:Name="RowDefinition0" Height="Auto"/>
                            <RowDefinition x:Name="RowDefinition1" Height="*"/>
                        </Grid.RowDefinitions>
                        <TabPanel x:Name="HeaderPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="2,2,2,0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/>
                        <Grid x:Name="ContentPanel" Grid.Column="0" Margin="{TemplateBinding Padding}" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"  Background="{TemplateBinding Background}">
                                <ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="2,2,2,2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                            </Border>
                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TabStripPlacement" Value="Bottom">
                            <Setter Property="Grid.Row" TargetName="HeaderPanel" Value="1"/>
                            <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
                            <Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
                            <Setter Property="Height" TargetName="RowDefinition1" Value="Auto"/>
                            <Setter Property="Margin" TargetName="HeaderPanel" Value="2,0,2,2"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="20"/>
            </Grid.ColumnDefinitions>
            <Rectangle Grid.ColumnSpan="2" HorizontalAlignment="Stretch" x:Name="Rectangle" VerticalAlignment="Stretch" Width="Auto" Height="Auto" RadiusX="5" RadiusY="5" Fill="{DynamicResource NormalBrush}" Stroke="{DynamicResource NormalBorderBrush}"/>
            <Rectangle Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" RadiusX="5" RadiusY="5" Fill="{DynamicResource WindowBackgroundBrush}" Stroke="{DynamicResource NormalBorderBrush}"/>
            <Path Grid.Column="1" HorizontalAlignment="Center" x:Name="Arrow" VerticalAlignment="Center" Fill="Gray" Data="M 0 0 L 4 4 L 8 0 Z"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Fill" Value="{DynamicResource MouseOverBrush}" TargetName="Rectangle"/>
            </Trigger>
            <Trigger Property="IsChecked" Value="true">
                <Setter Property="Fill" Value="{DynamicResource PressedBrush}" TargetName="Rectangle"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Fill" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Rectangle"/>
                <Setter Property="Stroke" Value="{DynamicResource DisabledBorderBrush}" TargetName="Rectangle"/>
                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
                <Setter Property="Fill" Value="{DynamicResource DisabledForegroundBrush}" TargetName="Arrow"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="SimpleComboBox" TargetType="{x:Type ComboBox}">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBox}" >
                    <Grid Background="White">
                        <ToggleButton Grid.Column="2" Template="{DynamicResource ComboBoxToggleButton}" x:Name="ToggleButton" Focusable="false" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"/>
                        <ContentPresenter HorizontalAlignment="Left" Margin="3,3,23,3" x:Name="ContentSite" VerticalAlignment="Center" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" IsHitTestVisible="False"/>
                        <Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide">
                            <Grid MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
                                <Border x:Name="DropDownBorder" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="Black" CornerRadius="0" BorderThickness="1"/>
                                <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained"/>
                            </Grid>
                        </Popup>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>